//============================================================================
// Copyright (C) 2003-2013 Brett R. Jones 
// All Rights Reserved
//
// You may redistribute and/or modify for non commercial and commercial uses 
// provided this copyright notice remains in place and is not modified
//
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================
class PktLoginReq : public VxPktHdr
{
public:
	PktLoginReq()
	{
		m_u16PktLen = sizeof( PktLoginReq );
		m_u16PktType = PKT_TYPE_LOGIN_REQ;
		u32ClientVersion = 0;
		u32Res = 0;
		as8Name[ 0 ] = 0;
	}
	void CalcLen( void )
	{
		//calculate length of packet from password len including null terminator
		m_u16PktLen = (U16)ROUND_TO_16BYTE_BOUNDRY( ( sizeof( PktLoginReq ) - (PKT_MAX_PWD_LEN + 1)+ strlen( as8Name ) ) );
	}
	U32	u32ClientVersion;			// version of client
	U32	u32Res;						// reserved
	char as8Name[ PKT_MAX_PWD_LEN + 1 ];
};
